package com.mingqijia.gassafety.webserver.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author zhangfei
 * @version 1.0.0
 * @ClassName SaveWarnStrategyRequest.java
 * @createTime 2022年02月28日
 */
@Data
@ApiModel("新增报警策略")
public class SaveWarnStrategyRequest {
    //主键id
    @ApiModelProperty(value = "报警策略id")
    private Long id;
    @ApiModelProperty(value = "报警策略审核id")
    private Long CheckId;


    //规则名称
    @ApiModelProperty(value = "规则名称")
    @NotBlank(message = "规则名称不能为空")
    @Length(min = 2, max = 32,message = "规则名称长度2-23字符")
    private String ruleName;

    //策略对象：0所有客户 1按照行业选择 2按照客户选择
    @NotNull(message = "策略对象不能为空")
    @ApiModelProperty(value = "策略对象：0所有客户 1按照行业选择 2按照客户选择")
    private Integer strategyObj;

    //行业或者客户数据：;号隔开
    @ApiModelProperty(value = "客户id/行业编码")
    private String strategyObjValues;

    //策略设备：0所有设备
    @NotNull(message = "策略设备不能为空")
    @ApiModelProperty(value = "策略设备：0所有设备")
    private Integer strategyEquipment;

    //备注说明
    @ApiModelProperty(value = "备注说明")
    private String remark;

    //"低报 %
    @ApiModelProperty(value = "低报 数值")
    private String lowReport;


    @ApiModelProperty(value = " 报警方式：0所有方式 1本地消息中心 2 短信推送 3 微信模版消息  4本地消息+短信 5本地消息+微信  6短信+微信\n" +
            "    7外呼 8本地消息+外呼 9微信+外呼 10短信+外呼\n" +
            "    11本地消息+短信+外呼  12本地消息+微信+外呼 13短信+微信+外呼 14本地消息+短信+微信")
    private Integer lowType;

    @ApiModelProperty(value = "本地消息中心报警间隔")
    //本地消息中心报警间隔
    private String lowReportInterval;

    //微信模版报警间隔
    @ApiModelProperty(value = "微信模版报警间隔")
    private String lowWxInterval;

    @ApiModelProperty(value = "短信报警间隔")
    //短信报警间隔
    private String lowSendInterval;

    @ApiModelProperty(value = "高报 数值")
    //高报 %
    private String highReport;

    //报警方式：1本地消息中心 2 短信推送 7
    @ApiModelProperty(value = "同上")
    private Integer highType;
    //本地消息中心报警间隔
    @ApiModelProperty(value = "本地消息中心报警间隔")
    private String highReportInterval;

    //微信模版报警间隔
    @ApiModelProperty(value = "微信模版报警间隔")
    private String highWxInterval;
    //短信报警间隔

    @ApiModelProperty(value = "短信报警间隔")
    private String highSendInterval;

    @ApiModelProperty(value = "外呼报警间隔")
    private String highCallInterval;
    @ApiModelProperty(value = "外呼报警间隔")
    private String lowCallInterval;
    //  ext策略数据
    @ApiModelProperty(value = "额外的策略数据")
    private List<WarnStrategyExtRequest> extData;



    @ApiModelProperty(value = "保存并启用，0保存并启用 ，1仅保存")
    private int saveAndEnable;

    private int source;

    @ApiModelProperty(value = "企业名称")
    private String enterpriseName;


    private String spId;


    @ApiModelProperty(value = "高报微信消息手机号")
    @Length( max = 1000,message = "请输入1000以内的字符")
    private String highWxPhones;

    @ApiModelProperty(value = "低报微信消息手机号")
    @Length( max = 1000,message = "请输入1000以内的字符")
    private String lowWxPhones;

    @ApiModelProperty(value = "校验报警状态：1勾选 0未勾选")
    private Integer checkDeviceState;

    @ApiModelProperty(value = "高报外呼时是否发送短信 0代表发送 1代表不发送")
    private Integer highCallSendNote;

    @ApiModelProperty(value = "低报外呼时是否发送短信 0代表发送 1代表不发送")
    private Integer lowCallSendNote;

    @ApiModelProperty(value = "高报短信推送模板CODE，可以为空，为空取默认")
    private String highSmsMsgCode;

    @ApiModelProperty(value = "高报微信推送模板CODE，可以为空，为空取默认")
    private String highWxMsgCode;

    @ApiModelProperty(value = "低报短信推送模板CODE，可以为空，为空取默认")
    private String lowSmsMsgCode;

    @ApiModelProperty(value = "低报微信推送模板CODE，可以为空，为空取默认")
    private String lowWxMsgCode;
}
